package com.zoffy.ybuhelper;

import android.app.Application;
import androidx.room.Room;
import com.zoffy.ybuhelper.database.YBUDatabase;

public class MyApplication extends Application {
    private static MyApplication app;
    private YBUDatabase YBUDatabase;
    @Override
    public void onCreate() {
        super.onCreate();
        app=this;
        YBUDatabase = Room.databaseBuilder(this, YBUDatabase.class,"YBU.db")
                .allowMainThreadQueries()
                .addMigrations()
                .createFromAsset("YBU.db")
                .build();

    }
    public static MyApplication getInstance(){
        return app;
    }

    public YBUDatabase getYBUDatabase() {
        return YBUDatabase;
    }
}
